#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
    int h = 0, m = 0, k = 0;
    scanf("%d:%d %d", &h, &m, &k);
    int k1 = k / 60;
    int k2 = k % 60;
    m = m + k2;
    h = h + k1 + m / 60;
    h = h % 24;
    m = m % 60;
    printf("%02d:%02d", h, m);
    return 0;
}